home *** CD-ROM | disk | FTP | other *** search
-
- #define EXTERN extern
- #include "INIPGMS.h"
-
- int DrvList2DlgBox( hWndDlg, ID_List )
- HWND hWndDlg ;
- USHORT ID_List ;
- {
- static CHAR szDrive [] = " :" ;
- SHORT sDrive ;
- USHORT usDriveNum ;
- ULONG ulDriveMap ;
-
- if( DosQCurDisk (&usDriveNum, &ulDriveMap) )
- return( -1 );
-
- WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
-
- for (sDrive = 0 ; sDrive < 26 ; sDrive++)
- if(ulDriveMap & 1L << sDrive)
- {
- szDrive[1] = (CHAR) sDrive + 'A' ;
- WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
- MPFROM2SHORT (LIT_END, 0),
- MPFROMP (szDrive)) ;
- }
-
- return( 0 ) ;
- } /* End DrvList2DlgBox */
-